package com.fdb.efp.nls.service.dao;

import com.fdb.efp.nls.service.domain.SResource;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>DAO interface:系统资源信息表				<p>
 * @author fuzm
 * @date 2018-05-03
 */
public interface SResourceDao {
	
	public int insertSResource(SResource sResource);
	
	public int deleteByPk(SResource sResource);
	
	public int updateByPk(SResource sResource);
	
	public SResource queryByPk(SResource sResource);
	
	public List<SResource> queryAllOwnerByPage(SResource sResource);
	
	public List<SResource> queryAllCurrOrgByPage(SResource sResource);
	
	public List<SResource> queryAllCurrDownOrgByPage(SResource sResource);
	/**
	 * 查询当前法人机构所属的 资源菜单， 和公共菜单
	 * @param sResource
	 * @return
	 */
	public List<SResource> queryChildrens(SResource sResource);
	/**
	 * 查询当前 法人机构码下 和 公共菜单
	 * @param sResource
	 * @return
	 */
	public List<SResource> queryRescAll(SResource sResource);
	/**
	 * 查询当前登录用户拥有的资源菜单
	 * @param sResource
	 * @return
	 */
	public List<SResource> queryUserRescData(@Param("userCode") String userCode);
	public List<SResource> queryUserRescDataFinal(@Param("userCode") String userCode);
}